package com.yanmaohu.yulia.bean;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class TypeList {

    private int beginIndex;
    private int endIndex;
    private List<UserDefinedTypeSpecification> typeList;

    public TypeList(List<UserDefinedTypeSpecification> typeList) {
        this.beginIndex = typeList.get(0).getBeginIndex();
        this.endIndex = typeList.get(typeList.size() - 1).getEndIndex();
        this.typeList = typeList;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public int size() {
        return typeList.size();
    }

    public UserDefinedTypeSpecification get(int index) {
        return typeList.get(index);
    }

}
